<?php
class RegistrationForm extends Zend_Form
{
	public function init() {
		$this->setMethod(self::METHOD_POST);
		$this->addElement(new Zend_Form_Element_Text(array(
    	    'name' => 'email',
    	    'label' => 'E-mail',
    	    'required' => true,
		)));
		 
		/**
		 * @see http://zendframework.com/issues/browse/ZF-5672
		 * @var Zym_Validate_Confirm
		 */
		$confirmValidator = new Zym_Validate_Confirm('password2');
		
		$this->addElement(new Zend_Form_Element_Password(array(
    	    'name' => 'password',
    	    'label' => 'Heslo',
    	    'required' => true,
			'validators' => array($confirmValidator),
		)));
		 
		$this->addElement(new Zend_Form_Element_Password(array(
    	    'name' => 'password2',
    	    'label' => 'Heslo',
    	    'required' => true,
		)));
		
		 
		$this->addElement(new Zend_Form_Element_Submit(array(
    	    'name' => 'Zaregistrovat se',
    	    'ignore' => true,
		)));
	}


}